import ajax from './ajax'
/* 最受期待电影 */
export const reqExpectedList = ()=>ajax('/ajax/mostExpected?limit=10&offset=0&token=')
/* 热映电影 */
export const reqHotMovieList=()=>ajax.get('/ajax/movieOnInfoList')
/* 即将上映 */
export const reqComingMovieList = (data)=>ajax.get('/ajax/comingList',{params:{...data}})

export const reqMovieDetail = (movieId)=>ajax.get(`/ajax/detailmovie?movieId=${movieId}`)

/* 请求更多数据 */
export const reqMoreMovieList = (query)=>ajax.get(`/ajax/moreComingList?token=&movieIds=${query}`)
// ;(async ()=>{
//     const res=await reqExpectedList()
//     console.log(res);
// })()

//音乐会地址  https://m.dianping.com/myshow/ajax/performances/6;st=0;p=2;s=10;tft=0?cityId=10&sellChannel=7
//            https://m.dianping.com/myshow/ajax/position/detail

/* 统一管理请求；根据接口，编写函数 */

import mockAjax from "./mockAjax";

// 请求列表
export const reqCinemas = () => mockAjax.get('/cinemas');

// 请求地址
export const reqCity = () => mockAjax.get('/city');

// 获取影院详情
export const reqCinemasDeatil = (cinemasId) => mockAjax.get(`/CinemaDetail`,{cinemasId:{cinemasId}});

/* 测试 */
/* reqCinemasDeatil(1).then (
  response => {
    console.log(response);
  },
  error => {
    alert(error.message)
  }
) */
